home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-05-01 | 6.3 KB | 182 lines | [TEXT/MPS ] |
- ;
- ; File: Navigation.a
- ;
- ; Contains: Navigation Services Interfaces
- ;
- ; Version: Technology: System 8
- ; Release: Universal Interfaces 3.0d3 on Copland DR1
- ;
- ; Copyright: © 1984-1996 by Apple Computer, Inc. All rights reserved.
- ;
- ; Bugs?: If you find a problem with this file, send the file and version
- ; information (from above) and the problem description to:
- ;
- ; Internet: apple.bugs@applelink.apple.com
- ; AppleLink: APPLE.BUGS
- ;
- ;
- IF &TYPE('__NAVIGATION__') = 'UNDEFINED' THEN
- __NAVIGATION__ SET 1
-
- IF &TYPE('__TYPES__') = 'UNDEFINED' THEN
- include 'Types.a'
- ENDIF
- IF &TYPE('__APPLEEVENTS__') = 'UNDEFINED' THEN
- include 'AppleEvents.a'
- ENDIF
- IF &TYPE('__FILES__') = 'UNDEFINED' THEN
- include 'Files.a'
- ENDIF
- IF &TYPE('__EVENTS__') = 'UNDEFINED' THEN
- include 'Events.a'
- ENDIF
- IF &TYPE('__MIXEDMODE__') = 'UNDEFINED' THEN
- include 'MixedMode.a'
- ENDIF
- IF &TYPE('__SCRIPT__') = 'UNDEFINED' THEN
- include 'Script.a'
- ENDIF
- IF &TYPE('__TEXTOBJECTS__') = 'UNDEFINED' THEN
- include 'TextObjects.a'
- ENDIF
- IF &TYPE('__TIMEOBJECTS__') = 'UNDEFINED' THEN
- include 'TimeObjects.a'
- ENDIF
- IF FOR_SYSTEM8_COOPERATIVE THEN
- IF FOR_PTR_BASED_AE THEN
-
- gestaltNavigationServicesAttr EQU 'nvsv'
- gestaltNavigationServicesPresent EQU 0
- ; Values for the "action" parameter of NavAskSaveChanges
-
- kNavSaveChangesClosingDocument EQU 1 ; Closing a document
- kNavSaveChangesQuittingApplication EQU 2 ; Quitting the app
- kNavSaveChangesOther EQU 0 ; Neither closing nor quitting
- ; typedef UInt16 NavAskSaveChangesAction
-
- ; NavFileInfo is the part of NavFileOrFolderInfo for files
- NavFileInfo RECORD 0
- locked ds.b 1 ; offset: $0 (0)
- resourceOpen ds.b 1 ; offset: $1 (1)
- dataOpen ds.b 1 ; offset: $2 (2)
- reserved ds.b 1 ; offset: $3 (3)
- dataSize ds.l 1 ; offset: $4 (4)
- resourceSize ds.l 1 ; offset: $8 (8)
- finderInfo ds FInfo ; offset: $C (12)
- moreFinderInfo ds FXInfo ; offset: $1C (28)
- sizeof EQU * ; size: $2C (44)
- ENDR
- ; NavFolderInfo is the part of NavFileOrFolderInfo for folders and volumes
- NavFolderInfo RECORD 0
- shareable ds.b 1 ; offset: $0 (0)
- sharePoint ds.b 1 ; offset: $1 (1)
- mounted ds.b 1 ; offset: $2 (2)
- readable ds.b 1 ; offset: $3 (3)
- writeable ds.b 1 ; offset: $4 (4)
- reserved ds.b 1 ; offset: $5 (5)
- numberOfFiles ds.l 1 ; offset: $6 (6)
- finderInfo ds DInfo ; offset: $A (10)
- moreFinderInfo ds DXInfo ; offset: $1A (26)
- sizeof EQU * ; size: $2A (42)
- ENDR
- ; NavFileOrFolderInfo is the structure passed to your filter proc for typeFSS AEDescs
- NavFileOrFolderInfo RECORD 0
- isFolder ds.b 1 ; offset: $0 (0)
- visible ds.b 1 ; offset: $1 (1)
- creationDate ds TimeObject ; offset: $2 (2)
- modificationDate ds TimeObject ; offset: $12 (18)
- fileInfo ds NavFileInfo ; offset: $22 (34)
- ORG 34
- folderInfo ds NavFolderInfo ; offset: $22 (34)
- ORG 78
- sizeof EQU * ; size: $4E (78)
- ENDR
- NavDialogOptions RECORD 0
- location ds Point ; offset: $0 (0) ; Top-left of the dialog, or (-1, -1) for default position
- banner ds.l 1 ; offset: $4 (4) ; Optional banner text displayed in the dialog
- defaultButtonLabel ds.l 1 ; offset: $8 (8) ; Label of the default button (or null string for default)
- customPanel ds.l 1 ; offset: $C (12) ; Custom SOM panel to be inserted, if any
- sizeof EQU * ; size: $10 (16)
- ENDR
- NavReplyRecord RECORD 0
- validRecord ds.b 1 ; offset: $0 (0) ; True if the user confirmed the selection, false on cancel
- replacing ds.b 1 ; offset: $1 (1) ; True if we are overwriting an existing object (put only)
- selection ds AEDesc ; offset: $2 (2) ; AppleEvent descriptor of the selected object
- sizeof EQU * ; size: $A (10)
- ENDR
- ; return values from NavAskSaveChanges, NavCustomAskSaveChanges
-
- askSaveChangesSave EQU 1
- askSaveChangesCancel EQU 2
- askSaveChangesDontSave EQU 3
- ; typedef UInt16 NavAskSaveChangesResult
-
- ;
- ; To specify which types of data you are willing to receive, use the NavTypeList.
- ; *
- ; * This is not a list of file types; that must be specified in an 'open' resource
- ; * if you are displaying files, or you can use a filter procedure. It is a list of
- ; * AEDesc types. Only items which can be coerced to these descriptor types will be
- ; * displayed in the list, descended into as containers, or returned in a reply.
- ; * The list is terminated by a null entry and may be of any length. At present
- ; * only typeFSS and typeAlias are supported.
- ; *
- ; * If you include typeAlias in the list, then aliases of all types will be allowed,
- ; * and aliases will not be resolved before they are given to you. Otherwise, aliases
- ; * will be resolved internally and you will be passed their resolved AEDescs if
- ; * they can be coerced into one of the types you want.
- ;
- NavTypeList RECORD 0
- elements ds.l 4
- sizeof EQU * ; size: $10 (16)
- ENDR
-
-
- ; typedef const DescType * ConstNavTypeListPtr
-
- ;
- ; * Navigation Services Dialogs
- ;
- ;
- ; pascal OSErr NavAskSaveChanges(ConstTextObject applicationName, ConstTextObject documentName, NavAskSaveChangesAction action, NavAskSaveChangesResult *reply, Point location, NavEventUPP eventProc, void *contextPtr)
- ;
- IF GENERATINGCFM THEN
- IMPORT_CFM_FUNCTION NavAskSaveChanges
- ENDIF
-
- ;
- ; pascal OSErr NavCustomAskSaveChanges(ConstTextObject message, NavAskSaveChangesResult *reply, Point location, NavEventUPP eventProc, void *contextPtr)
- ;
- IF GENERATINGCFM THEN
- IMPORT_CFM_FUNCTION NavCustomAskSaveChanges
- ENDIF
-
- ;
- ; pascal OSErr NavGetObject(const AEDesc *defaultObject, NavReplyRecord *reply, NavDialogOptions *dialogOptions, short openResourceID, ConstNavTypeListPtr typeList, NavObjectFilterUPP filterProc, NavEventUPP eventProc, void *contextPtr)
- ;
- IF GENERATINGCFM THEN
- IMPORT_CFM_FUNCTION NavGetObject
- ENDIF
-
- ;
- ; pascal OSErr NavPutObject(const AEDesc *defaultObject, NavReplyRecord *reply, NavDialogOptions *dialogOptions, NavEventUPP eventProc, void *contextPtr)
- ;
- IF GENERATINGCFM THEN
- IMPORT_CFM_FUNCTION NavPutObject
- ENDIF
-
- ;
- ; * Generating unique file names
- ;
- ;
- ; extern OSErr MakeUniqueNameInFolder(FSSpec *folder, TextObject *name)
- ;
- IF GENERATINGCFM THEN
- IMPORT_CFM_FUNCTION MakeUniqueNameInFolder
- ENDIF
-
- ENDIF
- ENDIF
- ENDIF ; __NAVIGATION__
-
-